package cn.jizi.service.impl;

import cn.jizi.entity.SysMenu;
import cn.jizi.entity.SysUser;
import cn.jizi.mapper.MenuMapper;
import cn.jizi.mapper.SysUserMapper;
import cn.jizi.service.MenuService;
import cn.jizi.utils.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

/**
 * @author 宋朝阳
 * @create 2020 -11 -27 17:20
 */
@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private SysUserMapper selectByMap;

    @Resource
    private MenuMapper menuMapper;

    /**
     * 登录
     * @param loginname   用户名
     * @return
     */
    @Override
    public SysUser loginname(String loginname) {
        return menuMapper.loginname(loginname);
    }

    @Override
    public List<SysMenu> queryMenuByUid(Integer userid) {
        return menuMapper.queryMenuByUid(userid);
    }

    @Override
    public List<SysMenu> loadAvailableMenu() {
        return menuMapper.loadAvailableMenu();
    }
}
